﻿using System.Data.Entity;
using ContractManager.Data.Mapping;
using Repository;

namespace ContractManager.Data
{
    public partial class ContractContext : DbContextBase, IDbContext
    {
        public ContractContext() :
            base("ContractContext")
        {
            Database.SetInitializer<ContractContext>(null);
            Configuration.ProxyCreationEnabled = false;
        }

        public new IDbSet<T> Set<T>() where T : class
        {
            return base.Set<T>();
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            modelBuilder.Configurations.Add(new CapitalMap());
         
        }
    }

    
}
